// OUTDOOR SCRIPT
//    Out 1,1: Valzakov Forest

beginoutdoorscript;

variables;

short choice, i;

body;

beginstate INIT_STATE;

break;


beginstate EXIT_STATE;

break;


beginstate START_STATE;

break;


beginstate 10;

if (get_sdf(3,4) == 0) {
 set_flag(3,4,1);
 message_dialog("As you near this cliff, you get a very odd sensation. There is a very strange presence emanating from this place. It is very subtle, but you can feel it.","");
}

break;


beginstate 11;

reset_dialog();
 add_dialog_str(0,"You stumble onto another small Nephilim village. Unlike just about every previous encounter on this island, they are actually very friendly and welcoming. The suspicion must have not reached this far.",0);
 add_dialog_str(1,"You sit down and enjoy some refreshing berries and they tell you news of seeing people to the south but no village. You also hear about some strange walking statue to the west.",0);
 add_dialog_str(2,"As you are about to leave, one of their merchants offers to take you to his store.",0);
 add_dialog_choice(0,"Go to the store.");
 add_dialog_choice(1,"Leave.");
 choice = run_dialog(1);
 if (choice == 1)
  begin_shop_mode("Nephil Goods","The people in this isolated village are the friendliest you have yet encountered on this island. The goods are also reasonably priced.",7,1,3);
 if (choice == 2) {
  message_dialog("You apologetically tell him that you are on important business. He is slightly disappointed, but quite understanding. You depart from the village.","");
 }

break;


beginstate 12;

reset_dialog();
add_dialog_str(0,"You encounter a walking, living statue out here in the wild. A golem! Who would have the power to create such a powerful magical artifact in these primative isolated surroundings?",0);
add_dialog_str(1,"Fortunately, the golem does not seem hostile or interested in you at all. It seems very old and run down. You wonder how long it has been here.",0);
add_dialog_choice(0,"Approach the golem.");
add_dialog_choice(1,"Destroy the golem.");
add_dialog_choice(2,"Back away.");
choice = run_dialog(1);
 if (choice == 1) {
  outdoor_enc_result(1);
  message_dialog("You approach the golem and it just walks right past you. You get close to do some visual inspection, and all you can tell is that it is very old. You find no indication of who created it.","");
 }
 if (choice == 2)
  message_dialog("You draw your weapons and attempt to smash the golem. Unfortunately, its primal defense mechanisms are still active!","");
 if (choice == 3) {
  outdoor_enc_result(1);
  message_dialog("You back away from the strange magical creature. Ancient magical relics tend to be unstable and you do not want to risk your lives on this.","");
 }

break;


beginstate 13;

reward_give(445);
message_dialog("You manage to hack apart the golem. One of its power crystals remains intact and still emits a good deal of energy. You get a warm vibrant feeling near it, so you take it.","You inspect the remains of the golem and all you find is the word _ZYON_ engraved into its inner machinery. You have no idea what this means.");

break;


beginstate 14;

reset_dialog();
add_dialog_str(0,"Several shades huddle around some strange crystalline object. They seem intently focused on you and do not notice. They huddle so close that in order to get to the object, you would reveal your presence to them.",0);
add_dialog_choice(0,"Approach the spirits.");
add_dialog_choice(1,"Back away.");
choice = run_dialog(1);
 if (choice == 1)
  message_dialog("As you get closer, the crystalline object appears to be some kind of strange, alien container. The spirits seem to worship it very intently.","However, these beings generally seek the life force of healthy adventurers like you. Your living energy is enough to draw them away once you get too close.");
 if (choice == 2) {
  outdoor_enc_result(1);
  message_dialog("You decide to leave these supernatural creatures alone with their petty treasure.","");
}

break;


beginstate 15;

reward_give(449);
message_dialog("With the spirits dead, you approach the crystaline container. Upon your touch, the magical seal breaks open and the lid slides away. You peer inside and see a softly glowing garment, a robe.","You take it from the alien container. As you remove its contents, the container dissolves leaving no indication that it was there. You wonder how it got here in the first place -- another mystery about this island.");

break;


beginstate 16;

outdoor_enc_result(1);
reset_dialog();
add_dialog_str(0,"A strange tree-like spirit frolicks in these bushes. You conclude this creature is probably a Dryad. They tend to be friendly, but can be highly unpredictable creatures and should be dealt with with caution.",0);
add_dialog_choice(0,"Approach the Dryad.");
add_dialog_choice(1,"Attack the spirit.");
add_dialog_choice(2,"Back away.");
choice = run_dialog(1);
 if (choice == 1)
  set_state_continue(17);
 if (choice == 2) {
  message_dialog("You charge the creature. It looks shocked and dives into a tree, vanishing! The world begins to swirl around you and you feel violently ill. Among the waves of nausea and vomiting, you swear you hear laughter.","");
  eliminate_outdoor_enc(3,7);
  set_flag(3,7,1);
  set_char_status(1000,7,100,1,1);
 }  

break;


beginstate 17;

reset_dialog();
add_dialog_str(0,"You approach the Dryad. She looks at you carefully, scanning you over. There is a long uncertain pause as she ponders her next action. Eventually she decides to approach you.",0);
add_dialog_str(1,"_Greetings strange creatures, I am Vanessa, a Dryad of this forest. Great evil has come here and resonates throughout the woods, infecting the trees at the roots, poisoning this place._",0);
add_dialog_str(2,"_I sense you are here for a fate. You may be the one to destroy this great evil. Not all is certain, but perhaps I can help you. I can lend you some of the power of this forest to aid you._",0);
add_dialog_str(3,"_However, be warned, only those of pure intent can wield the power of these woods. Do you want to take my gift?_",0);
add_dialog_choice(0,"Accept the power.");
add_dialog_choice(1,"Decline the offer.");
choice = run_dialog(1);
 if (choice == 1) {
  message_dialog("_I am glad to see that you accept the risk. Your bravery is enough to show your pure intent._ Vanessa begins to focus her powers and the forest around her comes to life.","_Those that can use magic to call upon the creatures of this forest will have their spell enhanced. Use this augmented power from the forest to heal it._");
  i = 0;
  while (i < 4) {
   change_spell_level(i,0,2,1);
   i = i +1;
  }
  eliminate_outdoor_enc(3,7);
  set_flag(3,7,1);
 }
 if (choice == 2)
  message_dialog("_I understand strange creatures. There is great risk in great power. If you ever decide to take upon the risk, return to me._","");

break;


beginstate 18;

if (get_sdf(3,8) == 0) {
 reset_dialog();
  add_dialog_str(0,"You find some very large mushrooms in this moist glade. You deduce that these are toadstools, a valuable alchemical ingredient.",0);
  add_dialog_choice(0,"Pick the toadstools.");
  add_dialog_choice(1,"Leave.");
  choice = run_dialog(1);
  if (choice == 1) {
   reward_give(218);
   set_flag(3,8,1);
   message_dialog("You pick the toadstools. It will be a long time before they grow back. You will probably be long off the island by then.","");
  }
  if (choice == 2)
   end();
}

break;


beginstate 19;

reset_dialog();
add_dialog_str(0,"Before you is a small glimmering pool of water. It looks very refreshing. So much that you are compelled to drink.",0);
add_dialog_choice(0,"Drink from the pool.");
add_dialog_choice(1,"Leave.");
choice = run_dialog(1);
 if (choice == 1) {
  if (get_sdf(3,13) == 0) {
   set_flag(3,13,1);
   message_dialog("You all take a drink from the refreshing water. A few seconds later, your mind whirls around. You feel a new found clarity in your mind, a new height in consciousness. Stange power on this island.","");
  award_party_xp(500,5);
 }
 else
  message_dialog("You take another drink from the water. This time you do not get the same effect as last time. In fact, it tastes just like refreshing, normal spring water.","");
}

break;